{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "8eb833e8",
   "metadata": {
    "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19",
    "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5",
    "execution": {
     "iopub.execute_input": "2021-08-26T15:27:20.570464Z",
     "iopub.status.busy": "2021-08-26T15:27:20.568384Z",
     "iopub.status.idle": "2021-08-26T15:27:20.580688Z",
     "shell.execute_reply": "2021-08-26T15:27:20.579956Z",
     "shell.execute_reply.started": "2021-08-24T11:49:40.976049Z"
    },
    "papermill": {
     "duration": 0.022693,
     "end_time": "2021-08-26T15:27:20.580874",
     "exception": false,
     "start_time": "2021-08-26T15:27:20.558181",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "632a1f9d",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2021-08-26T15:27:20.596321Z",
     "iopub.status.busy": "2021-08-26T15:27:20.595651Z",
     "iopub.status.idle": "2021-08-26T15:27:20.880499Z",
     "shell.execute_reply": "2021-08-26T15:27:20.879890Z",
     "shell.execute_reply.started": "2021-08-24T11:49:41.066428Z"
    },
    "papermill": {
     "duration": 0.294808,
     "end_time": "2021-08-26T15:27:20.880650",
     "exception": false,
     "start_time": "2021-08-26T15:27:20.585842",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "test_data = pd.read_csv('../input/soccerfeverchallenge/test.csv')\n",
    "\n",
    "confusing_index_test = test_data[(test_data.proj_score1 - test_data.proj_score2 ==0)].index\n",
    "\n",
    "submission = pd.read_csv('../input/soccerfeverchallenge/submission.csv')\n",
    "\n",
    "submission['Outcome'] = test_data.apply(lambda x : 0 if x.proj_score1 - x.proj_score2<0 else 1,axis =1)\n",
    "\n",
    "submission[submission.index.isin(confusing_index_test)] = 0.52"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4e4bb143",
   "metadata": {
    "execution": {
     "iopub.execute_input": "2021-08-26T15:27:20.895489Z",
     "iopub.status.busy": "2021-08-26T15:27:20.894481Z",
     "iopub.status.idle": "2021-08-26T15:27:20.925540Z",
     "shell.execute_reply": "2021-08-26T15:27:20.926137Z",
     "shell.execute_reply.started": "2021-08-24T11:49:48.875403Z"
    },
    "papermill": {
     "duration": 0.040814,
     "end_time": "2021-08-26T15:27:20.926314",
     "exception": false,
     "start_time": "2021-08-26T15:27:20.885500",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Outcome</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Outcome\n",
       "0      1.0\n",
       "1      1.0\n",
       "2      0.0\n",
       "3      1.0\n",
       "4      0.0"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "submission.to_csv('submission.csv',index =False)\n",
    "\n",
    "submission.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1b875996",
   "metadata": {
    "papermill": {
     "duration": 0.005354,
     "end_time": "2021-08-26T15:27:20.937421",
     "exception": false,
     "start_time": "2021-08-26T15:27:20.932067",
     "status": "completed"
    },
    "tags": []
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  },
  "papermill": {
   "default_parameters": {},
   "duration": 9.282149,
   "end_time": "2021-08-26T15:27:21.551981",
   "environment_variables": {},
   "exception": null,
   "input_path": "__notebook__.ipynb",
   "output_path": "__notebook__.ipynb",
   "parameters": {},
   "start_time": "2021-08-26T15:27:12.269832",
   "version": "2.3.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
